<template>
    <div class="main">
      <div class="judge" v-if="judgeNum ==1">
        <div class="judgecon">
          <h3>提示</h3>
          <p>您是否为美丽田园会员?</p>
          <div>
            <a @click="register()">否</a>
            <a @click="bind()">是</a>
          </div>
          <span @click="judgeNum = 0">X</span>
        </div>
      </div>
    </div>
</template>

<script>
  import {
    baseUrl,
    myUrl,
    auth,
  } from "@/assets/public";
    export default {
        name: 'main',
        data() {
            return {}
        },
        mounted() {
        },
        methods: {
          //注册跳转
          register(){
            location.href = myUrl+'/bind?openid='+localStorage.openid+"&returnUrl="+window.location.href;
          },
          //绑定跳转
          bind(){
            this.bang_url="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7302aaa9857c055b&redirect_uri=http://bfwechat.beautyfarm.com.cn/wechat/member/Index.aspx?Source="+encodeURIComponent(myUrl)+"&ToUserName=gh_a0db7a77b670&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";
            window.location.href=this.bang_url;
          },
        },
        props:["judgeNum"],
    }
</script>

<style scoped>
  .judge {
    width: 100%;
    height:100vh;
    position: fixed;
    top:0;
    left:0;
    z-index:999999;
    background: rgba(76,76,76,.9);
  }
  .judge .judgecon {
    width: 80%;
    height:3rem;
    background: #fff;
    border-radius: .3rem;
    margin:6.5rem auto;
    position: relative;
  }
  .judge .judgecon h3 {
    width: 100%;
    height:1rem;
    line-height:1rem;
    font-size:.5rem;
    font-weight:bolder;
    text-align: center;
  }
  .judge .judgecon p {
    width: 100%;
    text-align: center;
    line-height:1rem;
    font-size:.36rem;
    border-bottom:1px solid #333333;
  }
  .judge .judgecon div {
    width: 100%;
    height:1rem;
    line-height:1rem;
    display: flex;
    align-items:center;
  }
  .judge .judgecon div a {
    width: 50%;
    text-align: center;
    color: #2d78f4;
    font-size:.38rem;
  }
  .judge .judgecon div a:first-child {
    border-right:1px solid #999;
  }
  .judge .judgecon span {
    font-size:.5rem;
    display: block;
    width: .8rem;
    height: .8rem;
    line-height:.8rem;
    text-align: center;
    color: #2d78f4;
    /*border:1px solid #999999;*/
    border-radius: 50%;
    position: absolute;
    top:0;
    right:0;
  }
</style>
